<template>
  <div>
    <table border="1">

      
      <el-table :data="logs" stripe style="width: 100%">
      <el-table-column prop="id" label="Id" width="180" />
      <el-table-column prop="date" label="date" width="180" />
      <el-table-column prop="action" label="action" width="180" />
    </el-table>
    </table>
  </div>
</template>

<script>

import axios from 'axios';


import { onMounted, ref } from 'vue'

import { reactive } from '@vue/reactivity';

export default {
  name: "log",
  setup(props){
        const logs = ref([])
        const getLog = () => {
            return  axios.get("/account/log").then(res => {
                console.log(res.data);
                return res;
            }).catch(e => {
                return e.res.data;
            })
        }
        onMounted(async () => {
            const data = await getLog();
            logs.value = data.data.data;
        })
        return{
            logs,
        }
    }  
}
</script>